package Model.Dominio;

// <editor-fold defaultstate="collapsed" desc=" UML Marker "> 
// #[regen=yes,id=DCE.F2B7C22F-2F03-AC57-6E85-02BE3FEF8E46]
// </editor-fold> 
public class ClienteNatural extends Persona {

    private String contrasena;

    public ClienteNatural(String nombre, String apellido, int cedula, long telefono, char sexo, String eMail, String contrasena) {
        super(nombre, apellido, cedula, telefono, sexo, eMail);
        this.contrasena = contrasena;
    }

    // <editor-fold defaultstate="collapsed" desc=" UML Marker "> 
    // #[regen=yes,id=DCE.399FED5E-C606-6E52-E41E-056357CDD432]
    // </editor-fold> 
    public ClienteNatural() {
    }

    // <editor-fold defaultstate="collapsed" desc=" UML Marker ">
    // #[regen=yes,regenBody=yes,id=DCE.EACC787D-343A-6989-6E45-40AF7B981267]
    // </editor-fold>
    private  void setContrasena(String val) {
        this.contrasena = val;
    }

    // <editor-fold defaultstate="collapsed" desc=" UML Marker ">
    // #[regen=yes,id=DCE.3BBE1274-3EFA-E682-28FF-27FC5C9FB688]
    // </editor-fold>
    public boolean asignarContrasena(String contrasena, int cedula, String eMail) {
        if ((cedula == this.getCedula()) && (eMail == null ? this.geteMail() == null : eMail.equals(this.geteMail()))) {
            setContrasena(contrasena);
            return true;
        } else {
            return false;
        }
    }
}

